1. Field of the Invention
The present invention generally relates to computer systems and more particularly to a method for extending static device driver functionality without requiring rebuilding of the operating system.
2. Description of the Prior Art
The basic structure of a conventional computer system 10 is shown in FIG. 1. The heart of computer system 10 is a central-processing unit (CPU) or processor 12, which is connected to several peripheral devices, including input/output (I/O) devices 14 (such as a display monitor and keyboard) for the user interface, a permanent memory device 16 (such as a hard disk or floppy diskette) for storing the computer's operating system and user programs, and a temporary memory device 18 (such as random-access memory or RAM) that is used by processor 12 to carry out program instructions. Processor 12 communicates with the peripheral devices by various means, including a bus 20 or a direct channel 22. Computer system 10 may have many additional components which are not shown, such as serial and parallel ports for connection to, e.g., modems or printers. Those skilled in the art will further appreciate that there are other components that might be used in conjunction with those shown in the block diagram of FIG. 1; for example, a display adapter connected to processor 12 might be used to control a video display monitor. Various types of device drivers (software programs) are used to control the hardware devices.
Computer system 10 also includes firmware 24 whose primary purpose is to seek out and load an operating system from one of the peripherals (usually permanent memory device 16) whenever the computer is first turned on. The process of seeking out and loading the operating system is referred to as "booting" the computer. Computer system 10 may be designed to allow firmware 24 to re-initialize an operating system without turning the computer off and back on again (a "soft" boot). Firmware 24 is essentially a series of machine instructions which are typically stored in a read-only storage (ROS) device, such as read-only memory (ROM). As shown in the flow chart of FIG. 2, after power to computer system 10 is turned on, processor 12 begins to execute the firmware instructions and seeks out an operating system (26). If an operating system is found, it is loaded (28) into temporary memory 18, including any device drivers present in the operating system image, to enable the system to communicate with appropriate hardware. Thereafter, additional device drivers may be dynamically loaded by the operating system (30), for example, if a hardware device is connected to the computer system after the boot sequence. Finally, the operating system allows other application layers to be added, i.e., user software programs (32).
The foregoing description generally applies to any type of operating system, including two popular operating systems known as MSDOS and UNIX (MSDOS is a trademark of Microsoft Corp.; UNIX is a trademark of UNIX System Laboratories), but the present invention has particular application to UNIX. UNIX is a multi-user, multi-tasking operating system which is available from a variety of sources with different versions. These include, among others, System V (American Telephone & Telegraph), AIX (International Business Machines) and Mach (NeXT Computers). FIG. 3 illustrates a typical UNIX workstation 34. Workstation 34 includes the various hardware components shown in FIG. 1, and generally represented at 36, and furthermore includes two software layers, the kernel 38 and the user application layer 40. Kernel 36 is the lowest level of the operating system and acts as the intermediary between user programs and hardware devices and includes, among other things, device drivers that interface with hardware control 42. Kernel 38 may include static device drivers 44 which are originally bound with the kernel during initialization and dynamically loaded device drivers 46 which are added to the kernel after initialization. A dynamically loaded device driver 46 can be used for a unique device or can simply be a replacement for a generic static device driver. Both types of device drivers are usually accessed by a buffering mechanism such as a device switch table 48.
Device drivers are often hardware dependent, which can present difficulties when installing or using particular hardware devices. If an appropriate device driver for a new device is not already present in the kernel, (i.e., statically bound) and if a dynamically loadable driver is not available, then the kernel must be re-bound with a new static device driver. If a dynamically loadable driver is available, then it can easily be loaded as a kernel extension but, in some cases, the system requires certain devices or hardware functions to be provided only via static device drivers bound in the kernel since the facilities they require must exist prior to the ability to load kernel extensions. These functions include, for example, NVRAM, RAMDD, and console device drivers. In these cases, the only way to enhance the functionality or capabilities of the static device driver is to rebuild the base kernel. Similarly, there is no way to modify a static device driver once it has been loaded. For example, there might be a bug (software instruction error) in the static device driver, but it cannot be fixed unless the kernel is rebuilt. It would, therefore, be desirable and advantageous to devise a method of changing the functionality of a statically bound device driver without requiring rebuilding of the kernel or otherwise rebooting the operating system.